function [ s ] = DiscretizeState( x, statelist )
%DiscretizeState check which entry in the state list is closer to x and
%return the index of that entry.

xr=repmat(x,length(statelist),1);
[d  s] = min(edist(statelist,xr));

